CC=gcc

OBJS += server.o
OBJS += main.o
OBJS += cJSON.o
OBJS += json_data.o

CFLAGS=-c -o

all:
	@echo "make server :编译服务器代码目标" 
	@echo "make test :编译QT和hass测试代码"
	@echo "make clean:清除"
	@echo "make file :查看文件功能"

server:$(OBJS)
	$(CC) $^ -o $@ -lpthread
%.o:%.c
	$(CC) $(CFLAGS) $@ $< 

test:
	gcc hass-server.c -o hass-server -lpthread
	gcc qt-client.c -o qt-client -lpthread

.PHONY:clean 
clean:
	rm *.o hass-server qt-client server -f

file:
	cat README
